package study.lgf.action.form;

import java.util.ArrayList;
import java.util.List;

import study.lgf.model.People;
import study.lgf.model.TagModel;

import com.opensymphony.xwork2.ActionSupport;

@SuppressWarnings("serial")
public class ControlTagsAction extends ActionSupport {
	private TagModel tag;
	@Override
	public String execute() throws Exception {
		if(tag == null){
			tag = new TagModel();
		}
		
		tag.setIntValue(1);
		tag.setBValue(true);
		
		List<String> list = new ArrayList<String>();
		list.add("字符串1");
		list.add("字符串2");
		list.add("字符串3");
		list.add("字符串4");
		tag.setListValue(list);
		
		List<People> pList = new ArrayList<People>();
		pList.add(new People("林光锋",19));
		pList.add(new People("巧云",18));
		pList.add(new People("小白",1));
		pList.add(new People("饿",11));
		pList.add(new People("啊",100));
		tag.setListObj(pList);
		return SUCCESS;
	}
	public TagModel getTag() {
		return tag;
	}
	public void setTag(TagModel tag) {
		this.tag = tag;
	}
}
